package com.gitee.wsl.resource

import androidx.compose.runtime.Composable

import androidx.compose.ui.text.font.FontStyle
import androidx.compose.ui.text.font.FontWeight
import org.jetbrains.compose.resources.DrawableResource
import org.jetbrains.compose.resources.FontResource
import org.jetbrains.compose.resources.StringResource
import org.jetbrains.compose.resources.imageResource
import org.jetbrains.compose.resources.painterResource
import org.jetbrains.compose.resources.stringResource
import org.jetbrains.compose.resources.vectorResource

object R {
    @Composable
    fun string(resource: StringResource) = stringResource(resource)

    @Composable
    fun string(resource: StringResource, vararg formatArgs: Any) = stringResource(resource,formatArgs)

    @Composable
    fun font(resource: FontResource,
             weight: FontWeight = FontWeight.Normal,
             style: FontStyle = FontStyle.Normal) = org.jetbrains.compose.resources.Font(resource,weight,style)

    @Composable
    fun painter(resource: DrawableResource) = painterResource(resource)

    @Composable
    fun image(resource: DrawableResource) = imageResource(resource)

    @Composable
    fun vector(resource: DrawableResource) = vectorResource(resource)


}
